148 XIII INTEGRATION (f) Suppose that X is compact and ju,(X) = 1. Consider a sequence (an) of ft-integrable functions such that liman(x) =f(x) almost everywhere. Suppose moreover that there n-»-oo exists a /z-integrable function G ^ 0 such that \gn\ ^ G almost everywhere, for each integer n. Show that under these conditions the sequence converges almost everywhere to/*(*). (Reduce to the case/= 0. For each e e ]0, 1[, there exists 8 > 0 such that, for each ^-integrable subset B of X satisfying ^(B) <J 8, * we have G d^ <£ e2 (13.15.5). Next, there exists an integer m such that the set Ae of points xeX satisfying sup \gn(x)\ <.e2 has measure p,(Ae) ^1—8. Let Gfi be the function which is equal to e2 on Ae and to G on X — As; then for n ^> m and all x e X, we may write - "Z *(«*(*)) n k = o nL ^t Deduce from (c) that the set of points x e X such that lim sup - !>*(«*(*)) has measure g 13. Let X be a locally compact space, ju a positive measure on X, and u: X -> X a con- tinuous mapping such that, for each /z-negligibJe set N, the set //""'(N) is /-i-negligible. A measurable real-valued function / on X is said to be ^-invariant with respect to uiff°u and/are equal almost everywhere (relative to ft). A /^-measurable subset A of X is said to be ^-invariant with respect to u if its characteristic function is /x- invariant with respect to u. (a) For a measurable function/to be ^-invariant with respect to u, it is necessary and sufficient that, for each rational number r, the set of points x e X such that f(x) ^ r should be ^-invariant with respect to u. (To show that the condition is sufficient, consider the set of points x e X such that/(*/(#)) ^f(x),) (b) From now on, suppose that u is proper and the measure ^-invariant with respect to u (i.e., U(IJL) = /j). The mapping u is said to be ergodic with respect to /u. (or /x is ergodic with respect to u) if the only ju-measurable functions which are ^-invariant with respect to u are constant almost everywhere. Then, for every /^-integrable function /on X, the function /*(*) = lim /I"-1 \ !im -Z/VW) ~fco\/Z *=0 / is constant almost everywhere. If X is compact, the value of the constant is f I /(*) dju(x)j//u(X). Conversely, if X is compact and if/* is constant almost every- where, for every /^.-integrable function /, then u is ergodic.educe to the case /2> 0, and